home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
mus
/
edit
/
soxgui12.lha
/
SoxGui12
/
SoxGui.b
< prev
next >
Wrap
Text File
|
1995-05-26
|
13KB
|
563 lines
'SoxGui 1.2 25.05.1995 by Stephan Klein
'a graphical user-interface to Amisox 3.3
'Mit WBarg.o linken"
'Faltmarkierung für GoldEd: ''
''--Init--
#include "ACEInclude:NewWBarg.h"
DECLARE SUB GoXY(x,y)
DECLARE SUB STRING GetPath$(STRING Pfad$)
SHORTINT theGad, avg, rev, ech, vib, ban, hig, low, vol,n
SHORTINT edelay,evolume,vspeed,vdepth,bcenter,bwidth,bn,hcenter,lcenter,volvolume
SHORTINT flag
STRING file$,in$, inpath$, out$, outpath$, thearg$, soxname$, playname$
avg=0 : rev=0 : ech=0 : vib=0 : ban=0 : bn=0 : hig=0 : low=0 : vol=0
flag=1
in$="" : inpath$="" : out$="" : outpath$=""
IF WBlaunched THEN
thearg$=WBargpath$(0)+WBarg$(0)
soxname$=ToolTypeVal$(thearg$,"SOXPATH")
playname$=ToolTypeVal$(thearg$,"PLAYERPATH")
IF soxname$="" THEN
soxname$="sox"
END IF
IF playname$="" THEN
playname$="play"
END IF
ELSE
soxname$="sox"
playname$="play"
END IF
''
''--Window & Bevelboxes--
WINDOW 2,"SoxGui V1.2",(0,11)-(640,200),30
BEVELBOX (10,5)-(620,40),3 'für Files
BEVELBOX (120,10)-(550,20),2 'für Inputfile
BEVELBOX (120,25)-(550,35),2 'für Outputfile
BEVELBOX (10,45)-(620,140),3 'für Effekte
BEVELBOX (10,145)-(620,170),3 'für Aktionen
GoXY(240,8)
PRINT " Files to work on "
GoXY(235,48)
PRINT " Assignable effects "
GoXY(270,148)
PRINT " Actions "
''
''--Gadgets--
GADGET 255,ON,"Inputfile" ,(20,10)-(110,20),BUTTON 'Input
GADGET 254,ON,"Outputfile",(20,25)-(110,35),BUTTON 'Output
GADGET 253,ON,"Play",(560,10)-(610,20),BUTTON 'Play Input
GADGET 252,ON,"Play",(560,25)-(610,35),BUTTON 'Play Input
GADGET 250,ON," ",(20,55)-(40,65),BUTTON 'Average
GoXY(50,63)
PRINT"Average"
GADGET 240,ON," ",(20,65)-(40,75),BUTTON 'Reverse
GoXY(50,73)
PRINT"Reverse"
GADGET 230,ON," ",(20,75)-(40,85),BUTTON 'Echo
GADGET 229,OFF,1000,(120,75)-(220,84),POTX
GADGET 228,OFF, 100,(350,75)-(450,84),POTX
GoXY(50,83)
PRINT"Echo"
GoXY(225,83)
PRINT "Delay:"
GoXY(455,83)
PRINT"Volume:"
GADGET 220,ON," ",(20,85)-(40,95),BUTTON 'Vibro
GADGET 219,OFF, 30,(120,85)-(220,94),POTX
GADGET 218,OFF, 100,(350,85)-(450,94),POTX
GoXY(50,93)
PRINT"Vibro"
GoXY(225,93)
PRINT "Speed:"
GoXY(455,93)
PRINT"Depth:"
GADGET 210,ON," ",(20,95)-(40,105),BUTTON 'Band
GADGET 209,OFF,15000,(120,95)-(220,104),POTX
GADGET 208,OFF,3000,(350,95)-(450,104),POTX
GADGET 207,OFF," ",(560,95)-(580,105),BUTTON
GoXY(50,103)
PRINT"Band"
GoXY(225,103)
PRINT "Center:"
GoXY(455,103)
PRINT"Width:"
GoXY(585,103)
PRINT "n"
GADGET 200,ON," ",(20,105)-(40,115),BUTTON 'Highpass
GADGET 199,OFF,15000,(120,105)-(220,114),POTX
GoXY(50,113)
PRINT"Highpass"
GoXY(225,113)
PRINT "Center:"
GADGET 190,ON," ",(20,115)-(40,125),BUTTON 'Lowpass
GADGET 189,OFF,15000,(120,115)-(220,124),POTX
GoXY(50,123)
PRINT"Lowpass"
GoXY(225,123)
PRINT "Center:"
GADGET 180,ON ," ",( 20,125)-( 40,135),BUTTON 'Lowpass
GADGET 179,OFF,200,(120,125)-(220,134),POTX
GoXY(50,133)
PRINT"Volume"
GoXY(225,133)
PRINT "Volume:"
GADGET 170,ON,"About",(20,150)-(120,165),BUTTON
GADGET 160,ON,"AMISOX !!!",(130,150)-(500,165),BUTTON
GADGET 150,ON,"Help",(510,150)-(610,165),BUTTON
''
''--Mainloop--
loop:
GADGET WAIT 0
theGad = GADGET(1)
CASE
theGad=255 : GOSUB GetInFile
theGad=254 : GOSUB GetOutFile
theGad=253 : GOSUB PlayInput
theGad=252 : GOSUB PlayOutput
theGad=250 : GOSUB Average
theGad=240 : GOSUB Reverse
theGad=230 : GOSUB Echo
theGad=229 : GOSUB Echo2
theGad=228 : GOSUB Echo3
theGad=220 : GOSUB Vibro
theGad=219 : GOSUB Vibro2
theGad=218 : GOSUB Vibro3
theGad=210 : GOSUB Band
theGad=209 : GOSUB Band2
theGad=208 : GOSUB Band3
theGad=207 : GOSUB Band4
theGad=200 : GOSUB Highp
theGad=199 : GOSUB Highp2
theGad=190 : GOSUB Lowp
theGad=189 : GOSUB Lowp2
theGad=180 : GOSUB Volume
theGad=179 : GOSUB Volume2
theGad=170 : GOSUB About
theGad=160 : GOSUB Sox
theGad=150 : Gosub Help
theGad=256 : GOSUB CleanUp
END CASE
GOTO loop
''
''--ClearALL--
ClearAll:
CASE
avg=1 : GOSUB Average
rev=1 : GOSUB Reverse
ech=1 : GOSUB Echo
vib=1 : GOSUB Vibro
ban=1 : GOSUB Band
hig=1 : GOSUB Highp
low=1 : GOSUB Lowp
vol=1 : GOSUB Volume
END CASE
RETURN
''
''--GetInFile--
GetInFile:
file$=FILEBOX$("Select File ...",inpath$)
IF file$<>"" THEN
in$=file$
GoXY(125,18)
PRINT SPACE$(53)
GoXY(125,18)
PRINT RIGHT$(in$,53)
inpath$=GetPath$(in$)
END IF
RETURN
''
''--GetOutFile--
GetOutFile:
file$=FILEBOX$("Select File ...",outpath$)
IF file$<>"" THEN
out$=file$
GoXY(125,33)
PRINT SPACE$(53)
GoXY(125,33)
PRINT RIGHT$(out$,53)
outpath$=GetPath$(out$)
END IF
RETURN
''
''--PlayInput--
PlayInput:
SYSTEM playname$+" "+CHR$(34)+in$+CHR$(34)
RETURN
''
''--PlayOutput--
PlayOutput:
SYSTEM playname$+" "+CHR$(34)+out$+CHR$(34)
RETURN
''
''--Average--
Average:
GADGET CLOSE 250
IF avg=1 THEN
avg=0
flag=1
GADGET 250,ON," " ,(20,55)-(40,65),BUTTON
ELSE
GOSUB ClearAll
avg=1
GADGET CLOSE 250
GADGET 250,ON,"*" ,(20,55)-(40,65),BUTTON
END IF
RETURN
''
''--Reverse--
Reverse:
GADGET CLOSE 240
IF rev=1 THEN
rev=0
flag=1
GADGET 240,ON," " ,(20,65)-(40,75),BUTTON
ELSE
GOSUB ClearAll
rev=1
GADGET CLOSE 240
GADGET 240,ON,"*" ,(20,65)-(40,75),BUTTON
END IF
RETURN
''
''--Echo--
Echo:
GADGET CLOSE 230
GADGET CLOSE 229
GADGET CLOSE 228
IF ech=1 THEN
ech=0
flag=1
GADGET 230,ON," " ,(20,75)-(40,85),BUTTON
GADGET 229,OFF,1000,(120,75)-(220,84),POTX
GADGET 228,OFF, 100,(350,75)-(450,84),POTX
ELSE
GOSUB ClearAll
ech=1
GADGET CLOSE 230
GADGET CLOSE 229
GADGET CLOSE 228
GADGET 230,ON,"*" ,(20,75)-(40,85),BUTTON
GADGET 229,ON,1000,(120,75)-(220,84),POTX
GADGET 228,ON, 100,(350,75)-(450,84),POTX
GADGET MOD 229,edelay
GADGET MOD 228,evolume
END IF
RETURN
Echo2:
edelay=GADGET(3)
GoXY(280,83)
PRINT" "
GoXY(280,83)
PRINT STR$(edelay)+"ms"
RETURN
Echo3:
evolume=GADGET(3)
GoXY(510,83)
PRINT" "
GoXY(510,83)
PRINT STR$(evolume)+"%"
RETURN
''
''--Vibro--
Vibro:
GADGET CLOSE 220
GADGET CLOSE 219
GADGET CLOSE 218
IF vib=1 THEN
vib=0
flag=1
GADGET 220,ON," " ,(20,85)-(40,95),BUTTON
GADGET 219,OFF, 30,(120,85)-(220,94),POTX
GADGET 218,OFF, 100,(350,85)-(450,94),POTX
ELSE
GOSUB ClearAll
vib=1
GADGET CLOSE 220
GADGET CLOSE 219
GADGET CLOSE 218
GADGET 220,ON,"*" ,(20,85)-(40,95),BUTTON
GADGET 219,ON, 30,(120,85)-(220,94),POTX
GADGET 218,ON, 100,(350,85)-(450,94),POTX
GADGET MOD 219,vspeed
GADGET MOD 218,vdepth
END IF
RETURN
Vibro2:
vspeed=GADGET(3)
GoXY(280,93)
PRINT" "
GoXY(280,93)
PRINT vspeed
RETURN
Vibro3:
vdepth=GADGET(3)
GoXY(510,93)
PRINT" "
GoXY(510,93)
PRINT STR$(vdepth)+"%"
RETURN
''
''--Band--
Band:
GADGET CLOSE 210
GADGET CLOSE 209
GADGET CLOSE 208
GADGET CLOSE 207
IF ban=1 THEN
ban=0
flag=1
GADGET 210,ON," " ,(20,95)-(40,105),BUTTON
GADGET 209,OFF,15000,(120,95)-(220,104),POTX
GADGET 208,OFF, 3000,(350,95)-(450,104),POTX
GADGET 207,OFF," ",(560,95)-(580,105),BUTTON
ELSE
GOSUB ClearAll
ban=1
GADGET CLOSE 210
GADGET CLOSE 209
GADGET CLOSE 208
GADGET CLOSE 207
GADGET 210,ON,"*" ,(20,95)-(40,105),BUTTON
GADGET 209,ON,15000,(120,95)-(220,104),POTX
GADGET 208,ON, 3000,(350,95)-(450,104),POTX
IF bn=1 THEN
GADGET 207,ON,"*",(560,95)-(580,105),BUTTON
ELSE
GADGET 207,ON," ",(560,95)-(580,105),BUTTON
END IF
GADGET MOD 209,bcenter
GADGET MOD 208,bwidth
END IF
RETURN
Band2:
bcenter=GADGET(3)
GoXY(280,103)
PRINT" "
GoXY(280,103)
PRINT STR$(bcenter)+"Hz"
RETURN
Band3:
bwidth=GADGET(3)
GoXY(510,103)
PRINT" "
GoXY(500,103)
PRINT STR$(bwidth)+"Hz"
RETURN
Band4:
GADGET CLOSE 207
IF bn=1 THEN
bn=0
GADGET 207,ON," ",(560,95)-(580,105),BUTTON
ELSE
bn=1
GADGET 207,ON,"*",(560,95)-(580,105),BUTTON
END IF
RETURN
''
''--Highp--
Highp:
GADGET CLOSE 200
GADGET CLOSE 199
IF hig=1 THEN
hig=0
flag=1
GADGET 200,ON," " ,(20,105)-(40,115),BUTTON
GADGET 199,OFF,15000,(120,105)-(220,114),POTX
ELSE
GOSUB ClearAll
hig=1
GADGET CLOSE 200
GADGET CLOSE 199
GADGET 200,ON,"*" ,(20,105)-(40,115),BUTTON
GADGET 199,ON,15000,(120,105)-(220,114),POTX
GADGET MOD 199,hcenter
END IF
RETURN
Highp2:
hcenter=GADGET(3)
GoXY(280,113)
PRINT" "
GoXY(280,113)
PRINT STR$(hcenter)+"Hz"
RETURN
''
''--Lowp--
Lowp:
GADGET CLOSE 190
GADGET CLOSE 189
IF low=1 THEN
low=0
flag=1
GADGET 190,ON," " ,(20,115)-(40,125),BUTTON
GADGET 189,OFF,15000,(120,115)-(220,124),POTX
ELSE
GOSUB ClearAll
low=1
GADGET CLOSE 190
GADGET CLOSE 189
GADGET 190,ON,"*" ,(20,115)-(40,125),BUTTON
GADGET 189,ON,15000,(120,115)-(220,124),POTX
GADGET MOD 189,lcenter
END IF
RETURN
Lowp2:
lcenter=GADGET(3)
GoXY(280,123)
PRINT" "
GoXY(280,123)
PRINT STR$(lcenter)+"Hz"
RETURN
''
''--Volume--
Volume:
GADGET CLOSE 180
GADGET CLOSE 179
IF vol=1 THEN
vol=0
flag=1
GADGET 180,ON," " ,(20,125)-(40,135),BUTTON
GADGET 179,OFF,200,(120,125)-(220,134),POTX
ELSE
GOSUB ClearAll
vol=1
GADGET CLOSE 180
GADGET CLOSE 179
GADGET 180,ON,"*",(20,125)-(40,135),BUTTON
GADGET 179,ON,200,(120,125)-(220,134),POTX
GADGET MOD 179,volvolume
END IF
RETURN
Volume2:
volvolume=GADGET(3)
GoXY(280,133)
PRINT" "
GoXY(280,133)
PRINT STR$(volvolume)+"%"
RETURN
''
''--About--
About:
MSGBOX "SoxGui 1.2 by Stephan Klein 25.05.95","OK"
RETURN
''
''--Sox--
Sox:
IF (In$<>"") AND (Out$<>"") THEN
OPEN "O",254,"RAM:DoSox.bat"
PRINT #254,"failat 11"
PRINT #254,"echo "+CHR$(34)+"*E[0;0H*E[J"+CHR$(34) '..cls
PRINT #254,"prompt "+CHR$(34)+CHR$(34)
PRINT #254,"stack 40000"
IF rev=1 THEN
flag=0
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" reverse"
END IF
IF avg=1 THEN
flag=0
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" avg"
END IF
IF ech=1 THEN
flag=0
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" echo "+STR$(edelay/1000)+" "+STR$(evolume/100)
END IF
IF vib=1 THEN
flag=0
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" vibro "+STR$(vspeed)+" "+STR$(vdepth/100)
END IF
IF ban=1 THEN
IF bn=0 THEN
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" band "+STR$(bcenter)+" "+STR$(bwidth)
ELSE
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" band -n "+STR$(bcenter)+" "+STR$(bwidth)
END IF
flag=0
END IF
IF hig=1 THEN
flag=0
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" highp "+STR$(hcenter)
END IF
IF low=1 THEN
flag=0
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)+" lowp "+STR$(lcenter)
END IF
IF vol=1 THEN
flag=0
PRINT #254,soxname$+" -V -v "+STR$(volvolume/100)+" "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)
END IF
IF flag=1 THEN
PRINT #254,soxname$+" -V "+CHR$(34)+In$+CHR$(34)+" "+CHR$(34)+Out$+CHR$(34)
END IF
PRINT #254,"EndCli"
CLOSE #254
script$ = "NewShell "+CHR$(34)
script$ = script$+"CON:0/11/640/189/AmiSox "
script$ = script$+"/CLOSE"
script$ = script$+CHR$(34)+" FROM "
script$ = script$+"RAM:DoSox.bat"
SYSTEM script$
ELSE
dum=MsgBox("Please select files ....","OK")
END IF
RETURN
''
''--Help--
Help:
MSGBOX "Sorry, no help in this version","Oh no.."
RETURN
''
''--CleanUp--
CleanUp:
FOR n=255 TO 1 STEP -1
GADGET CLOSE n
NEXT
WINDOW CLOSE 2
KILL "RAM DISK:DoSox.bat"
END
''
''--SUB GoXY(x,y)--
SUB GoXY(x,y)
'Grafikcursor setzten, ohne Linie zu ziehen
PENUP
SETXY x,y
PENDOWN
END SUB
''
''--SUB GetPath$(Pfad$)--
SUB STRING GetPath$(STRING Pfad$)
' Eingangsvariable : Voller Pfadname mit File
' Ausgangsvariable : Pfad inklusive ":", aber ohne "/"
FOR i%=len(Pfad$) TO 1 STEP -1
dummy$=MID$(Pfad$,i%,1)
IF dummy$="/" OR dummy$=":" THEN
ende%=i%
IF dummy$="/" THEN ende%=ende%-1
EXIT FOR
END IF
NEXT
GetPath$=LEFT$(Pfad$,ende%)
END SUB
''